{% extends "admin/layout/admin.html" %}
{% block content %}
<div id="page-wrapper">
    <div class="row ">
        <div class="col-lg-12">
            <br/>
        </div>
    </div>
    <div class="row ">
        <div class="col-lg-12">
            <div class="panel panel-default">
                <div class="panel-heading">
                    <strong>文章类目管理</strong>
                </div>
                <!-- /.panel-heading -->
                <div class="panel-body">
                    <div class="row">
                        <div class="col-lg-6">
                            <form role="form" name="hform" id="hform" method="post" action="">      
                                <div class="form-group">
                                    <label for="category">分类</label>
                                    <select name="category" id="category" class="form-control">
                                        <option value="0">选择分类</option>
                                        {%for row in list%}
                                        <option value="{{row.id}}" {%if row.id==item.parent%}selected="selected"{%endif%} >{{row.Placeholder|raw}}{{row.name}}</option>
                                        {%endfor%} 
                                    </select>
                                </div>  
                                <div class="form-group">
                                    <label>名称</label>
                                    <input class="form-control" placeholder="" name="name" value="{{item.name}}">
                                </div>    
                                <div class="form-group">
                                    <label>描述</label>
                                    <input class="form-control" placeholder="" name="description" value="{{item.description}}">
                                </div>                                       
                                <div class="form-group">
                                    <label>排序</label>
                                    <input class="form-control" placeholder="排序" name='sort_order' value="{{item.sort_order}}" name="sort_order" id="sort_order">
                                </div>                                       


                                <input type='hidden' name='id' value="{{item.id}}" />
                                <button type="submit" class="btn btn-success">保存</button>
                                <button type="button" class="btn btn-default" onclick="goBack('{{urlRef()}}')" >返回</button>
                            </form>
                        </div>
                        <!-- /.col-lg-6 (nested) -->                              
                    </div>
                </div>
                <!-- /#page-wrapper -->
                {% endblock %}